/*
 * Copyright 2006 Mark Bakker <bakker.mark AT gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.google.gwt.vector.client;

import java.util.Set;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Element;
import com.google.gwt.vector.client.impl.VectorImpl;
import com.google.gwt.vector.client.ui.BasicShape.Fill;
import com.google.gwt.vector.client.ui.BasicShape.Stroke;

/**
 *
 */
public class Vector {
  private static VectorImpl impl;
  static {
    impl = (VectorImpl) GWT.create(VectorImpl.class);
  }

  public static Element createCircle() {
    return impl.createCircle();
  }

  public static Element createEclipse() {
    return impl.createEclipse();
  }

  public static Element createFill() {
    return impl.createFill();
  }

  public static Element createLine() {
    return impl.createLine();
  }

  public static Element createPolyline() {
    return impl.createPolyline();
  }

  public static Element createRectangle() {
    return impl.createRectangle();
  }

  public static Element createStroke() {
    return impl.createStroke();
  }

  public static Element createVectorGroup() {
    return impl.createVectorGroup();
  }

  public static boolean isVml() {
    return impl.isVml();
  }

  public static void setAttribute(Element element, String key, String value) {
    impl.setAttribute(element, key, value);
  }

  public static void setCircleCoord(Element element, double coordinateX,
      double coordinateY, double radius) {
    setEclipseCoord(element, coordinateX, coordinateY, radius, radius);
  }

  public static void setColor(Element element, String color) {
    impl.setColor(element, color);
  }

  public static void setColor(Fill fill, String color) {
    impl.setColor(fill, color);
  }

  public static void setCoord(Element element, double coordinateX,
      double coordinateY, double width, double height) {
    impl.setCoord(element, coordinateX, coordinateY, width, height);
  }

  public static void setDimension(Element element, double width, double height) {
    impl.setDimension(element, width, height);
  }

  public static void setEclipseCoord(Element element, double coordinateX,
      double coordinateY, double radiusX, double radiusY) {
    impl.setEclipseCoord(element, coordinateX, coordinateY, radiusX, radiusY);
  }

  public static void setFrom(Element element, double fromX, double fromY) {
    impl.setFrom(element, fromX, fromY);
  }

  public static void setGroupDimension(Element element, double width,
      double height) {
    impl.setGroupDimension(element, width, height);
  }

  public static void setOpacity(Fill fill, double opacity) {
    impl.setOpacity(fill, opacity);
  }

  public static void setOpacity(Element element, double opacity) {
    impl.setOpacity(element, opacity);
  }

  public static void setPoints(Element element, Set points) {
    impl.setPoints(element, points);
  }

  public static void setRadius(Element element, double radius) {
    impl.setRadius(element, radius);
  }

  public static void setRadius(Element element, double radiusX, double radiusY) {
    impl.setRadius(element, radiusX, radiusX);
  }

  public static void setStrokeColor(Stroke stroke, String color) {
    impl.setStrokeColor(stroke, color);
  }

  public static void setStrokeColor(Element element, String color) {
    impl.setStrokeColor(element, color);
  }

  public static void setStrokeOpacity(Element element, double opacity) {
    impl.setStrokeOpacity(element, opacity);
  }

  public static void setStrokeOpacity(Stroke stroke, double opacity) {
    impl.setStrokeOpacity(stroke, opacity);
  }

  public static void setStrokeWidth(Element element, double width) {
    impl.setStrokeWidth(element, width);
  }

  public static void setStrokeWidth(Stroke stroke, double width) {
    impl.setStrokeWidth(stroke, width);
  }

  public static void setTo(Element element, double toX, double toY) {
	impl.setFrom(element, toX, toY);
  }

}
